Method for converting the binary representation of a number in a signed binary representation

ABSTRACT

The invention concerns a method for converting in a signed binary representation (r′ m , r′ 0 ) of a number r based on a left-to-right processing of bits of the binary representation (r′ m , r′ 0 ) and enabling to obtain a representation equivalent to the so-called Reitwiesner representation. The use of such a conversion method with left-to-right arithmetic processing enables to improve their hardware implementation.

[0001] The present invention concerns a method of obtaining a signed binary representation of a number from its binary representation.

[0002] Fast arithmetic calculation techniques have for a long time been using the signed binary representation, since it makes it possible to calculate additions, multiplications or divisions very effectively.

[0003] Many integrated circuits comprise a device for converting a number into signed binary code from its binary representation and arithmetic calculation devices for performing operations with this operand in signed binary representation. In general, a reverse conversion device is provided, for supplying the result in the binary form.

[0004] In signed binary representation, a number is expressed in m digits of values “0”, “1” or “−1”. Several signed binary representations of the same number exist. For example, the number 5 can be written as (1 1 −1) , that is to say 1×2²+1×2¹−1×2⁰. However, it can also be written (1 0 1).

[0005] Amongst the possible signed binary representations, there exists a remarkable one, known as the Reitwiesner representation. This representation has the particularly interesting characteristics of being unique and hollow and having the smallest Hamming weight.

[0006] If the binary representation of the number r is denoted r=(r_(m−1), . . . , r₀), the Reitwiesner signed binary representation, which is denoted r=(r′_(m), r′_(m−1), . . . , r′₂, r′₁, r′₀), comprises one additional digit.

[0007] To state that this representation is hollow means that it satisfies the fact that the multiplication of two adjacent digits is zero, which is written:

r′_(i).r′_(i-1)=0, ∀iε{0, . . . , m}.

[0008] The Hamming weight for its part expresses the number of non-zero digits in the representation in question. Having a minimum Hamming weight therefore means an optimum maximum number of digits at “0”. However, the fewer “1” or “−1” digits in the representation, the fewer calculations there are actually to carry out, and hence an improvement in terms of calculation speed. This is therefore a particularly interesting property of the Reitwiesner representation in terms of fast arithmetic calculation.

[0009] The algorithm which makes it possible to obtain this remarkable signed binary representation from the binary representation (r_(m−1), . . . , r₀) of a number r, can be described as follows:

[0010] A calculation variable c is used, in binary.

[0011] The bit c₀ of rank 0 of this variable c is initialised to “0”.

[0012] There are added, to the binary representation (r_(m−1), . . . , r₀) of the number r, a bit of rank m+1 and a bit of rank m, both initialised to “0”: r_(m+1)=0; r_(m)=0

[0013] Then, for i equal to 0 up to i equal to m, the following are calculated:

c _(i+1)=└(c _(i) +r _(i) +r _(i+1))/2┘

r′ _(i) =c _(i) +r _(i)−2c _(i+1)

[0014] where └t┘ means the default value, that is to say the integer value immediately lower than the number t. In practice, as the arithmetic sum of the bits c_(i)+r_(i)+r_(i+1) is coded in a maximum of two bits in binary, the bit c_(i+1) is obtained by shifting this sum by one position to the right.

[0015] It can be seen that, in this Reitwiesner algorithm, the bits r_(i) of the binary representation of the number r are processed from right to left, in order to obtain each of the digits r′_(i) of the signed binary representation, from i equals 0 up to i equals m.

[0016] Various works were able to show that there was no algorithm in which the bits would be processed from left to right and by means of which the Reitwiesner signed binary representation would be obtained.

[0017] However, in many applications, the fast arithmetic calculation algorithms applied to an operand r process the digits r′_(i) in the signed binary representation of this operand from left to right. These algorithms prove in fact, in some cases, to be more effective both with regard to calculation time and on the hardware level (fewer registers necessary).

[0018] If the example is taken of calculating the exponentiation, an algorithm for modular exponentiation of a number a by an exponent r based on the right to left processing (ARL) can be as follows:

[0019] There are applied, as inputs of the algorithm, a number α, and the signed binary representation (r′_(m), r′_(m), . . . , r′₂, r′₁, r′₀)

[0020] The accumulator which contains the result M is initialised to 1, that is to say M=1.

[0021] A temporary register is initialised, which contains a calculation variable S with the number α to which the exponentiation is applied.

[0022] The following loop is implemented for i equals 0 up to i equals m−1:

[0023] if r′_(i)=1, the content M of the accumulator is multiplied by the variable S, and the result is loaded into the accumulator, which is written: M=M.S

[0024] if r′_(i)=−1, the content M of the accumulator is multiplied by the inverse of the variable S, and the result is loaded into the accumulator, which is written M=M.S⁻¹.

[0025] An algorithm for the modular exponentiation of the number α by the exponent r based on a left to right processing (ALR) of the exponent is as follows:

[0026] There are applied as inputs the number α, and the signed binary representation (r′_(m), r′_(m−1), . . . , r′₂, r′₁, r′₀) of the exponent r.

[0027] The content M of the accumulator is initialised to 1: M=1.

[0028] For i equals m to i equals 0:

[0029] the multiplication of the content of the accumulator by itself is performed and the accumulator is loaded with the result, which is written: M=M², and then

[0030] if r′_(i)=1, the content of the accumulator is multiplied by α and the result is loaded into the accumulator: M=M.α, or

[0031] if r′_(i)=−1, the content of the accumulator is multiplied by the inverse of α and the result is loaded into the accumulator: M=M.α⁻¹.

[0032] The right to left algorithm ARL therefore requires at least one additional register, for the variable S, than the left to right algorithm ALR. In addition, S being variable, it is necessary to calculate S⁻¹ each time the associated condition is achieved in the right to left algorithm. In the left to right algorithm, α being determined (fixed), its inverse α⁻¹ can be calculated only once and stored.

[0033] In the invention, it has been sought to combine the advantages of left to right processing both in the method of converting an operand and in the arithmetic processing using this operand.

[0034] Thus, in the invention, a signed binary representation equivalent to the Reitwiesner representation has been sought, that is to say a representation which has the same Hamming weight for the same length m (number of digits in the representation).

[0035] The object of the invention is therefore a method of converting a binary representation of a number into a signed binary representation comprising an optimum number, that is to say a maximum number, of zeros (minimum Hamming weight), and in which the bits are processed from left to right.

[0036] Another, object of the invention is a conversion device for obtaining a corresponding signed binary representation.

[0037] As characterised, the invention therefore concerns a method of obtaining a signed binary representation in m+1 digits (r′_(m), . . . , r′₀) of a number from its binary representation in m bits (r_(m−1), . . . , r₀) . According to this invention, this method consists of:

[0038] Adding in the binary representation of the number r to be converted a bit of rank m, a bit of rank −1 and a bit of rank −2 and initialising the said bits to the value 0,

[0039] Taking at least one calculation variable and initialising to 0 a bit of rank m of this variable, and

[0040] Performing m+1 iterations of a conversion loop, for i equals m up to i equals 0, the conversion loop comprising the following operations:

[0041] Applying as inputs of first calculation means the bit of rank i of the calculation variable b, and the bits of ranks i−1 and i−2 of the binary representation of the number r to be converted, the said first means supplying as an output the bit of rank i−1 of the calculation variable, performing an arithmetic operation equivalent to the default value of the arithmetic sum divided by two of the bits applied as inputs,

[0042] Applying as inputs of second calculation means the bits of rank i and i−1 of the calculation variable b, and the bit of rank i of the binary representation of the number to be converted r, the said calculation means performing an arithmetic operation equivalent to the multiplication by minus two of the bit of rank i of the calculation variable b, and the arithmetic sum of the preceding result with the other two bits applied as an input, in order to supply as an output the digit of rank i of the signed binary representation.

[0043] Other characteristics and advantages of the invention are detailed in the following description, given by way of indication and so as not to limit the invention and with reference to the accompanying drawings, in which:

[0044]FIG. 1 depicts an integrated circuit comprising such a conversion device and a device for arithmetic calculation of a modular exponentiation;

[0045]FIG. 2 depicts a block diagram of a conversion device according to the invention;

[0046]FIG. 3 depicts a look-up table which can be used for carrying out a conversion according to the method of the invention;

[0047]FIG. 4 depicts an example embodiment of a conversion device using such a table; and

[0048]FIG. 5 depicts another example embodiment of a conversion device according to the invention, using Boolean operators.

[0049]FIG. 1 depicts an integrated circuit of the microprocessor μP type comprising a memory MEM and a random number generator GEN.

[0050] This integrated circuit also comprises a device 1 for the exponentiation calculation of a number α by an exponent r. In the example, the number α is a fixed number contained in memory MEM and the exponent r is a number supplied in binary (r_(m−1), . . . , r₀) by the random number generator.

[0051] A device 2 for conversion into signed binary is provided in the integrated circuit, for converting the number r applied as an exponent in the calculation device 1.

[0052] There is obtained as an output from this conversion device the signed binary representation (r′_(m), . . . , r′₀) according to the invention, applied as an input to the calculation device 1. This signed binary representation is such that it has an optimum Hamming weight, like the so-called Reitwiesner representation.

[0053] The calculation device 1 depicted in FIG. 1 makes it possible to apply the left to right modular exponentiation algorithm ALR previously described. In this example, the calculation device comprises an accumulator 10 for the intermediate results and the final result of the exponentiation and three registers: a register 11 for the exponent, a register 12 for the number α and a register 13 for its inverse α⁻¹. In reality, the register 11 for the exponent is a double register: since each digit “0”, “1”, “−1” in signed binary is normally coded in at least two bits.

[0054] In one example, this code comprises two bits: one bit for the sign and one bit for the absolute value of the digit. In this example, this then gives: “0”=(X,0); “1”=(0,1); “−1”=(1,1) where X means that the bit can be equal to either to 0 or 1. In the example in the figure, X is equal to 0.

[0055] The calculation device 1 also comprises two multiplexers 20 and 21, and a multiplier 22. A control circuit 23 and a switch 24 supply the signals controlling the multiplexers.

[0056] The control circuit 23 receives the bit of absolute value r′_(iL) of the digit r′i of rank i of the exponent r (and a sequencing signal Ck). If this bit is equal to “1”, it activates (com1) the switch 24, in order to apply the sign bit r′_(iH) of the digit r′_(i) of the exponent as a control input for the multiplexer 20. Depending on whether the bit r′_(iH) is equal to “0” or “1”, the multiplexer 20 then transmits α or α⁻¹ as an input for the second multiplexer 21.

[0057] This second multiplexer 21 receives at another input the content M of the accumulator 10. It is controlled by an output Com2 of the control circuit 23, in order to apply, to an input of the multiplier 22, either the output of the first multiplexer 20, that is to say α or α⁻¹, or the content M of the accumulator.

[0058] The result of the output of the multiplexer is loaded into the accumulator.

[0059] The control circuit 23 is such that, in each iteration of the calculation loop for a result bit of the modular exponentiation, it first of all demands the switching of the input M output from the multiplexer 21, in order to calculate M.M in the multiplexer, and then, if the absolute value r′_(iL) of the digit r′_(i) of the exponent is equal to 1, in order to demand the switching of the output of the first multiplexer 20 (α or α⁻¹) output from the multiplexer 21.

[0060] The calculation device thus allows the calculation of the exponentiation of α by r, by means of a left to right processing.

[0061] The association of a left to right conversion device and an arithmetic processing device processing the result of the conversion from left to right, makes it possible to perform all these processing steps in real time. This is because, as soon as the digit r′_(i) is calculated and available at the output of the conversion device 2, it is immediately used in the arithmetic processing device 1.

[0062] With a conversion device processing the bits from right to left (Reitwiesner), it is possible to use the signed binary representation only once it is fully calculated, since the last digit converted r′_(m) is the first used in the arithmetic processing device processing the digits from left to right.

[0063] The homogeneity of the left to right processings of the bits in the conversion device according to the invention and of the digits in the calculation device therefore makes it possible to simplify the hardware implementation of these devices, by saving in particular on registers and improving the performance in terms of calculation speed.

[0064] The conversion device is not applied only to a device for calculating an exponentiation. It applies equally well to the calculation of the multiplication of a number α by a number r in signed binary representation, or to the scalar multiplication of a point by the number r in signed binary representation. In the latter case, a particularly interesting application of the invention concerns the case where the point is taken on an elliptic curve.

[0065]FIG. 2 depicts a block diagram of a conversion device 2 illustrating a conversion method according to the invention.

[0066] The method of obtaining a signed binary representation according to the invention, using left to right processing, is as follows:

[0067] There are added, in a register R1 containing the binary representation of the number r, a bit r_(m) of rank m, a bit r⁻¹ of rank −1 and a bit r⁻² of rank −2, and these three bits are initialised to the value 0.

[0068] A calculation variable b is taken from a register R2, and the bit b_(m) of rank m of this variable is initialised to 0.

[0069] m+1 iterations of a conversion loop are performed, from i equals m up to i equals 0, the conversion loop comprising the following operations:

[0070] Application as inputs e1, e2, e3 of first calculation means 30 of the bit b_(i) and the bits r_(i−1), r_(i−2) in order to calculate the arithmetic sum divided by two of these bits and to supply as an output bit b_(i−1), the bit corresponding to the default value of the result, which is written:

b _(i−1)=└(b _(i) +r _(i−1) +r _(i−2))/2┘.

[0071] Application as inputs e1′, e2′, e3′ of second calculation means 31, of the bits b_(i), b_(i−1) of the calculation variable b, and of the bit r_(i) of rank i of the binary representation of the number r, in order to calculate the arithmetic sum of minus twice the bit b_(i) with the other two bits applied as inputs, and to supply as an output the digit r′_(i) of the signed binary representation, which is written: r′_(i)=−2.b_(i)+b_(i−1)+r_(i).

[0072] The first and second calculation means can perform the arithmetic operation indicated, or an equivalent arithmetic operation.

[0073] These calculations are performed by means of a variable b. However, it is possible to implement the invention by using several variables.

[0074] As depicted in FIG. 2, a conversion device for implementing this method comprises the register R1 for containing the signed binary representation of the number r, including the bits r_(m), r⁻¹, r⁻² added to this representation. This register is of the shift to the left type, corresponding to the direction of processing of the bits from left (i=m) to right (i=0). The outputs of rank m, m−1 and m−2 of the register R1 are thus respectively applied to the input e′3 of the second calculation means 31, and to the inputs e2 and e3 of the first calculation means 30. At the end of each iteration, the register R1 is shifted by one position to the left, so that the outputs of rank m, m−1 and m−2 supply at each iteration the corresponding bits of rank i, i−1 and i−2.

[0075] The conversion device comprises another register R2 for the calculation variable b, also of the shift to the left type. In the example, this register comprises for each iteration the bit b_(i) and the bit b_(i−1). As the bit b_(i−1) is established from the bit b_(i), the first calculation means are activated first, in order to load into the register R2 the new value b_(i−1) to be used in the current iteration, in the second calculation means.

[0076] At the end of the iteration, the register R2 is shifted by one position to the left, for the following iteration.

[0077] In the invention, it has been possible to establish a look-up table corresponding to the conversion method which has just been disclosed. This look-up table depicted in FIG. 3 simplifies the conversion according to the invention. This is because it directly gives the result as an output, according to the inputs. In addition the register R2 in FIG. 2 can then be produced in the form of a simple latch, in order to contain, for the current iteration i, the bit b_(i).

[0078] In order to obtain this table, the value of the bit b_(i−1) was determined for each possible triplet (e1, e2, e3)=(b_(i), r_(i−1), r_(i−2)), and the value of the digit r′_(i) for each possible triplet as inputs (e1′, e2′, e3′)=(b_(i), r_(i), b_(i−1)) from the conversion algorithm according to the invention disclosed previously in relation to FIG. 2.

[0079] It has thus been possible to show that it was possible to determine the value of the bit b_(i−1) and of the digit r_(i), from the quadruplet (b_(i), r_(i), r_(i−1) and r_(i−2)), for each of the possible values of the latter.

[0080] With this conversion table, only the bit b_(i) of the variable b is used as an input for the current iteration. The bit b_(i−1) supplied as an output serves for the following iteration. Thus, with such a look-up table, the register R2 can be reduced to a simple latch, the new value of which is loaded at the end of each iteration, by the bit b_(i−1) supplied as an output by the table. This new value becomes that of the bit b_(i) in the following iteration.

[0081] An example of a practical embodiment of a conversion device according to the invention using such a conversion table is depicted in FIG. 4. It comprises a content addressable memory, denoted CAM. The look-up table in FIG. 3 is programmed in this memory so that, by applying the bits b_(i)., r_(i), r_(i−1) and r_(i−2) to the address bits A0, A1, A2, A3 of this memory, it supplies as an output the corresponding bit b_(i−1) and digit r′_(i).

[0082] At the end of each iteration, the bit b_(i−1) is loaded into the register R2. This bit becomes the bit b_(i) for the following iteration of the loop.

[0083] The digit r′_(i) is loaded into a register R3, which comprises in practice a first register R3H, for containing the signed bit r′_(iH) of each digit of the signed binary representation and a second register R3L for containing its absolute value r′_(iL).

[0084] Another example embodiment of a conversion device according to the invention is shown in FIG. 5. In this example, the conversion device is based on Boolean operators. Here also, the register R2 can be a simple latch reloaded by the bit b_(i−1) determined in the current iteration.

[0085] The definition of the Boolean operators results from work consisting of logic manipulation and minimalisation of the algorithm corresponding to the conversion method and to the look-up table according to the invention.

[0086] In the invention, it has been possible to define these operators from the bits b_(i)., r_(i), r_(i−1) and r_(i−2), in order to obtain directly as an output the bit b_(i−1) and the digit r′_(i).

[0087] By using the coding in two bits representing the sign and the absolute value, it has been possible to define the following Boolean operations:

b _(i−1) =/b _(i) .r _(i−1) .r _(i−2) +b _(i) .r _(i−1) +b _(i) .r _(i−2);

r′ _(iH) =b _(i);

r′ _(iL) =/b _(i) .r _(i−1) .r _(i−2) +/b _(i) .r _(i) +.b _(i) ./r _(i) +b _(i) ./r _(i−1) ./r _(i−2).

[0088] It should be noted that, when the digit r′_(i) is zero, that is to say if r′_(iL)=0, the signed bit r′_(iH) can be taken to be equal to either 0 or 1. Making r′_(iH)=b_(i) thus covers all cases, if any value 0 or 1 is accepted for the signed bit in the case where the digit is equal to 0. However, provision can be made for this signed bit to be fixed, for example fixed at 0, when the digit equals 0, as in the example given in FIG. 1.

[0089] An example of a corresponding embodiment of a conversion device comprising Boolean operators is depicted in FIG. 5. In this example, the conversion device comprises, in addition to the registers R1 and R2:

[0090] A first gate P1 of the AND type, comprising an inverting input for receiving the bit r_(i), and a non-inverting input for receiving the bit b_(i);

[0091] A second gate P2 of the AND type with the opposite inputs to the first;

[0092] A third gate P3 of the AND type, comprising an inverting input for receiving the bit r_(i−1), another inverting input for receiving the bit r_(i−2) and a non-inverting input for receiving the bit b_(i);

[0093] A fourth gate P4 of the AND type, receiving the opposite inputs to the third gate;

[0094] A fifth gate P5 of the AND type comprising a non-inverting input for receiving the bit r_(i−1), and another non-inverting input for receiving the bit b_(i);

[0095] A sixth gate P6 of the AND type, comprising a non-inverting input for receiving the bit r_(i−2), and another non-inverting input for receiving the bit b_(i);

[0096] A seventh gate P7 of the OR type, receiving as inputs the outputs of the first, second, third and fourth gates, and supplying as an output the absolute value r′_(iL) (0 or 1) of the digit r′_(i) of rank i of the signed binary representation, the signed bit r′_(iH) being supplied by the bit b_(i); and

[0097] An eighth gate P8 of the OR type, receiving as inputs the outputs of the fourth, fifth and sixth gates, in order to supply the bit b_(i−1) as an output.

[0098] The registers R1, R2 and R3, which contain respectively the binary representation of r, the calculation variable and the result of the conversion into signed binary are controlled as in FIG. 4.

[0099] The invention which has just been described can be used in many applications, and in particular those using cryptographic methods. It is applicable for supplying the signed binary representation of an operand used in any arithmetic processing, preferably processing the bits from left to right in order to extract therefrom the greatest benefit in terms of simplicity of design and processing speed. It should be noted that an example of application of the invention to the exponentiation of a fixed number by a variable number r (random) has been given, which uses the techniques of calculation by squares and multiplications (square and multiply). The invention applies equally well to the exponentiation of a random number by a fixed number r, which uses the techniques of additive chains. More generally, the invention applies to arithmetic calculation devices for the multiplication of a number α by the number r in signed binary representation, or to the scalar multiplication of a point by the number r. In the latter case, a particularly interesting application of the invention concerns the case where the point is taken on an elliptic curve. The list of possible applications is not exhaustive.

[0100] In all these applications the number of operations is reduced, as with the Reitwiesner representation, because of the minimum Hamming weight, with the additional advantages related to the left to right processing (hardware simplicity, reduction in the number of registers, processing in real time). 

1. A method of converting a number (r) into a signed binary representation in m+1 digits (r′_(m), . . . , r′₀) from its binary representation in m bits (r_(m−1), . . . , r₀), characterised in that it consists of: a) adding in the binary representation of the number (r) to be converted a bit (r_(m)) of rank m, a bit (r⁻¹) of rank −1 and a bit (r⁻²) of rank −2 and initialising the said bits to the value 0, b) using at least one calculation variable (b) and c) initialising to the value 0 a bit of rank m (b_(m)) of the said variable, d) performing a conversion loop, for i equals m up to i equals 0, comprising the following operations: (1) applying as inputs (e1, e2, e3) of first calculation means (30) the bit of rank i (b_(i)) of the calculation variable (b), and the bits of ranks i−1 and i−2 (r_(i−1), r_(i−2)) of the binary representation of the number to be converted, the said first means supplying as an output the bit of rank i−1 (b_(i−1)) of the calculation variable (b), performing an arithmetic operation equivalent to the default value of the arithmetic sum divided by two of the bits applied as inputs (e1, e2, e3), (2) applying as inputs (e1′, e2′, e3′) of second calculation means (31), the bits (b_(i), b_(i−1)) of rank i and i−1 of the calculation variable (b), and the bit (r_(i)) of rank i of the binary representation of the number to be converted (r), the said calculation means performing an arithmetic operation equivalent to the multiplication by minus two of the bit of rank i of the calculation variable (b), and the arithmetic sum of the preceding result with the other two bits applied as an input, in order to supply as an output the digit of rank i (r′_(i)) of the signed binary representation.
 2. A method according to claim 1, characterised in that it consists of applying the signed binary representation as inputs of an arithmetic calculation device (1), the said number (r) of which is an operand, the said calculation device processing the digits of the said operand from the highest rank to the least high rank.
 3. A conversion method according to any one of the preceding claims, characterised in that it comprises the use of a conversion table with four inputs as first and second calculation means, the said inputs corresponding to the bit (b_(i)) of rank i of the calculation variable (b), and to the bits (r_(i), r_(i−1), r_(i−2)) of rank i, i−1 and i−2 of the binary representation of the number to be converted (r), in order to supply directly as an output the value of the bit (b_(i−1)) of rank i−1 of the calculation variable (b) and the value of the digit (r′_(i)) of rank i of the signed binary representation.
 4. A conversion method according to one of claims 1 to 3, characterised in that each digit (r′_(i)) of the signed binary representation is supplied as an output in the form of a code with at least two bits.
 5. A conversion method according to claim 4, characterised in that each digit is coded in two bits, a first bit corresponding to the absolute value (r′_(iL)) and a second bit corresponding to the signed bit (r′_(iH)), the first bits are the digits of the signed binary representation being stored in a first output register (R3L) and the second bits of these digits being stored in a second output register (R3H), the said output registers being of the shift to the left type.
 6. A device for conversion into signed binary for the implementation of a method according to one of claims 3 to 5, characterised in that it comprises a content addressable memory (CAM), the bit (b_(i)) of rank i of the calculation variable (b), and the bits (r_(i), r_(i−1), r_(i−2)) of rank i, i−1 and i−2 of the binary representation of the number to be converted (r) being applied to the said memory as address bits (A0, A1, A2, A3).
 7. A conversion device implementing the conversion method according to any one of claims 1, 2, 4 or 5, characterised in that the first and second calculation means comprise Boolean operators.
 8. A conversion device according to claim 7, characterised in that the said Boolean operators receive as inputs the bit of rank i of the calculation variable (b), denoted b_(i), and the bits of rank i, i−1and i−2 of the binary representation of the number to be converted (r), respectively denoted r_(i), r_(i−1) and r⁻², in order to supply as an output the bit of rank i−1 of the calculation variable (b), denoted b_(i−1) and the digit of rank i, denoted r′_(i) of the signed binary representation.
 9. A conversion device according to claim 8 in which each digit of the signed binary representation is supplied in the form of a two-bit code according to claim 5, characterised in that the said Boolean operators comprise a set of logic gates able to apply to the bits of inputs b_(i), r_(i), r_(i−1), and r_(i−2) a first Boolean operation equivalent to /b_(i).r_(i−1).r_(i−2)+b_(i).r_(i−1)+b_(i).r_(i−2), in order to supply as an output the bit b_(i−1) and a second Boolean operation equivalent to /b_(i).r_(i−1).r_(i−2)+/b_(i).r_(i)+.b_(i)./r_(i)+b_(i)./r_(i−1)./r_(i−2), in order to supply as an output the bit representing the absolute value (r_(iL)) of the digit of rank i (r′_(i)) of the signed binary representation, the bits (r_(iH)) representing the sign of the said digit being equal to the bit of rank i (b_(i)) of the calculation variable or equal to 0 or 1 if the said digit is zero.
 10. A conversion device according to the preceding claim, characterised in that the said Boolean operators comprise: a) A first gate (P1) of the AND type, comprising an inverting input for receiving the bit (r_(i)) of rank i of the binary representation of the number to be converted (r), and a non-inverting input for receiving the bit (b_(i)) of rank i of the calculation variable; b) A second gate (P2) of the AND type with the opposite inputs to the first; c) A third gate (P3) of the AND type, comprising an inverting input for receiving the bit (r_(i−1)) of rank i−1 of the binary representation of the number to be converted (r), another inverting input for receiving the bit (r_(i−2)) of rank i−2 of the binary representation of the number to be converted (r), and a non-inverting input for receiving the bit (b_(i)) of the calculation variable (b); d) A fourth gate (P4) of the AND type, receiving the opposite inputs to the third gate; e) A fifth gate (P5) of the AND type comprising a non-inverting input for receiving the bit (r_(i−1)) of rank i−1 of the binary representation of the number to be converted (r), and another non-inverting input for receiving the bit (b_(i)) of rank i of the calculation variable (b); f) A sixth gate of the AND type, comprising a non-inverting input for receiving the bit (r_(i−2)) of rank i−2 of the binary representation of the number to be converted (r), and another non-inverting input for receiving the bit (b_(i)) of rank i of the calculation variable (b); g) A seventh gate (P7) of the OR type, receiving as inputs the outputs of the first, second, third and fourth gates, and supplying as an output the bit (r′_(iL)) representing the absolute value (0 or 1) of the digit (r′_(i)) of rank i of the signed binary representation, the bit (r′_(iH)) representing the sign being supplied by the bit (b_(i)) of rank i of the calculation variable (b); and h) An eighth gate (P8) of the OR type, receiving as inputs the output of the fourth, fifth and sixth gates, in order to supply the bit (b_(i−1)) of rank i−1 of the calculation variable (b) as an output.
 11. A conversion device according to any one of claims 6 to 10, characterised in that it comprises a first shift to the left input register (R1) for containing the binary representation of the number to be converted (r) and a second shift to the left register (R2) for containing the calculation variable (b).
 12. A device according to claim 11, characterised in that the said second register (R2) is a latch which contains the bit of rank i corresponding to the current iteration, and in that the bit of rank i−1 delivered as an output in this iteration is loaded into the latch in order to supply the bit of rank i in the following iteration.
 13. An integrated circuit comprising a conversion device according to any one of claims 6 to 12, characterised in that it also comprises a device (1) for arithmetic calculation according to a processing from the digit of the highest rank to the digit of the lowest rank in the signed binary representation.
 14. An integrated circuit according to claim 13, characterised in that the said arithmetic calculation device (1) is a device for exponentiation of a number (α) by the signed binary representation of the number (r) applied to the conversion device.
 15. An integrated circuit according to claim 13, characterised in that the said arithmetic calculation device (1) is a device for multiplying a number (α) by the signed binary representation of the number (r) applied to the conversion device.
 16. An integrated circuit according to claim 13, characterised in that the said arithmetic calculation device (1) is a device for the scalar multiplication of a point (α) by the signed binary representation of the number (r) applied to the conversion device.
 17. An integrated circuit according to claim 16, characterised in that the said point is taken on an elliptic curve. 